Prolog - How do you distinguish between just a string, and a variable? [closed]
Posted
by
Mr Prolog
on Programmers
See other posts from Programmers
or by Mr Prolog
Published on 2012-04-06T18:22:50Z
Indexed on
2012/04/06
23:39 UTC
Read the original article
Hit count: 278
When you are querying a Prolog database, often you will use terms that start with an uppercase letter as your variables. However, let's say that one of the constraints on your query is that a person's location must be "Dallas", and you want to query all the information in the database who meet those specifications. How would do you correctly make sure that Dallas is not interpreted as a variable to store a value in, and is interpreted as a string instead, for usage as a constraint on the query?
© Programmers or respective owner